package com.situ.stl.service;

import com.github.pagehelper.PageInfo;
import com.situ.stl.entity.Admin;

import java.util.List;

/** 
 * Service层 - 管理员
 */
public interface AdminService {

    /** 
     * add
     */
    int add( Admin admin) throws Exception;

    /** 
     * remove
     */
    int remove( int id) throws Exception ;

    /** 
     * edit
     */
    int edit( Admin admin) throws Exception ;

    /** 
     * getById
     */
    Admin getById( int id) ;

    /** 
     * get All
     */
    List<Admin> getAll() ;

    /** 
     * search
     */
    List<Admin> search( Admin admin) ;

    /** 
     * searchByPage
     */
    PageInfo searchByPage( Integer page, Integer limit, Admin admin) ;

    /** 
     * login
     */
    Admin login( Admin admin)  throws Exception;

    /** 
     * register
     */
    int reg( Admin admin, String repassword)  throws Exception;

    /**
     * 根据电话查询
     * @param phone
     * @return
     */
    Admin getByPhone(String phone);
}